import 'package:flutter/material.dart';
import 'package:incidentmanager/ui/case/add/case_stepper.dart';

class CaseAddPage extends StatelessWidget {
  static Route route() {
    return MaterialPageRoute<void>(builder: (_) => CaseAddPage());
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        centerTitle: true,
        title: Text(
          '案件上报',
          style: Theme.of(context).textTheme.headline6,
        ),
        leading: IconButton(
          icon: Icon(
            Icons.arrow_back_ios,
            size: Theme.of(context).iconTheme.size,
            color: Theme.of(context).iconTheme.color,
          ),
          onPressed: () {
            _back(context);
          },
        ),
        backgroundColor: Colors.white,
        elevation: 0,
      ),
      body: CaseStepper(),
    );
  }

  /// 返回
  void _back(BuildContext context) {
    Navigator.of(context).pop();
  }
}
